package suanfa.exam1;

import java.util.Scanner;

public class t6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] userSelect = new int[4];
        String[] goods = {"ロ香糖", "巧克力", "米花", "果汁"};
        boolean isExit = true;
        while (isExit) {
            int i = sc.nextInt();
            switch (i) {
                case 1:
                case 2:
                case 3:
                case 4:
                    System.out.println("您购买了" + goods[i-1]);
                    ++userSelect[i-1];
                    break;
                case 5:
                    for (int j = 0; j < userSelect.length; j++)
                        if (userSelect[j] > 0)
                            System.out.println("您购买了" + userSelect[j]+"个"+goods[j]);
                    break;
                case 6:
                    isExit = false;
                    break;
                default:
                    System.out.println("错误，请输入1-6以内的数");
                    break;
            }
        }
    }
}